DROP TABLE CRST_RA_CUST_TRX_LINE_GL_DIST;

CREATE TABLE CRST_RA_CUST_TRX_LINE_GL_DIST                                                                                                    
(                                                                                                                                                            
  CUST_TRX_LINE_GL_DIST_ID        NUMBER(15)    NOT NULL,                                                                                                    
  CUSTOMER_TRX_LINE_ID            NUMBER(15),                                                                                                                
  CODE_COMBINATION_ID             NUMBER(15)    NOT NULL,                                                                                                    
  SET_OF_BOOKS_ID                 NUMBER(15)    NOT NULL,                                                                                                    
  LAST_UPDATE_DATE                DATE          NOT NULL,                                                                                                    
  LAST_UPDATED_BY                 NUMBER(15)    NOT NULL,                                                                                                    
  CREATION_DATE                   DATE          NOT NULL,                                                                                                    
  CREATED_BY                      NUMBER(15)    NOT NULL,                                                                                                    
  LAST_UPDATE_LOGIN               NUMBER(15),                                                                                                                
  PERCENT                         NUMBER,                                                                                                                    
  AMOUNT                          NUMBER,                                                                                                                    
  GL_DATE                         DATE,                                                                                                                      
  GL_POSTED_DATE                  DATE,                                                                                                                      
  CUST_TRX_LINE_SALESREP_ID       NUMBER(15),                                                                                                                
  COMMENTS                        VARCHAR2(240 BYTE),                                                                                                        
  ATTRIBUTE_CATEGORY              VARCHAR2(30 BYTE),                                                                                                         
  ATTRIBUTE1                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE2                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE3                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE4                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE5                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE6                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE7                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE8                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE9                      VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE10                     VARCHAR2(150 BYTE),                                                                                                        
  REQUEST_ID                      NUMBER(15),                                                                                                                
  PROGRAM_APPLICATION_ID          NUMBER(15),                                                                                                                
  PROGRAM_ID                      NUMBER(15),                                                                                                                
  PROGRAM_UPDATE_DATE             DATE,                                                                                                                      
  CONCATENATED_SEGMENTS           VARCHAR2(240 BYTE),                                                                                                        
  ORIGINAL_GL_DATE                DATE,                                                                                                                      
  POST_REQUEST_ID                 NUMBER(15),                                                                                                                
  POSTING_CONTROL_ID              NUMBER(15)    DEFAULT -3  NOT NULL,                                                                      
  ACCOUNT_CLASS                   VARCHAR2(20 BYTE) NOT NULL,                                                                                                
  RA_POST_LOOP_NUMBER             NUMBER(15),                                                                                                                
  CUSTOMER_TRX_ID                 NUMBER(15)    NOT NULL,                                                                                                    
  ACCOUNT_SET_FLAG                VARCHAR2(1 BYTE) NOT NULL,                                                                                                 
  ACCTD_AMOUNT                    NUMBER,                                                                                                                    
  USSGL_TRANSACTION_CODE          VARCHAR2(30 BYTE),                                                                                                         
  USSGL_TRANSACTION_CODE_CONTEXT  VARCHAR2(30 BYTE),                                                                                                         
  ATTRIBUTE11                     VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE12                     VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE13                     VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE14                     VARCHAR2(150 BYTE),                                                                                                        
  ATTRIBUTE15                     VARCHAR2(150 BYTE),                                                                                                        
  LATEST_REC_FLAG                 VARCHAR2(1 BYTE),                                                                                                          
  ORG_ID                          NUMBER(15),
  MRC_ACCOUNT_CLASS               VARCHAR2(2000 BYTE),                                                                                                       
  MRC_CUSTOMER_TRX_ID             VARCHAR2(2000 BYTE),                                                                                                       
  MRC_AMOUNT                      VARCHAR2(2000 BYTE),                                                                                                       
  MRC_GL_POSTED_DATE              VARCHAR2(2000 BYTE),                                                                                                       
  MRC_POSTING_CONTROL_ID          VARCHAR2(2000 BYTE),                                                                                                       
  MRC_ACCTD_AMOUNT                VARCHAR2(2000 BYTE),                                                                                                       
  COLLECTED_TAX_CCID              NUMBER(15),                                                                                                                
  COLLECTED_TAX_CONCAT_SEG        VARCHAR2(240 BYTE),                                                                                                        
  REVENUE_ADJUSTMENT_ID           NUMBER(15),                                                                                                                
  REV_ADJ_CLASS_TEMP              VARCHAR2(30 BYTE),                                                                                                         
  REC_OFFSET_FLAG                 VARCHAR2(1 BYTE),
  CUST_TRX_LINE_GL_DIST_ID_N      NUMBER(15)                                                                                                           
);
